(function(){
	angular.module("appRouterModule",[])
		.config(["$stateProvider","$urlRouterProvider",
            function($stateProvider,$urlRouterProvider){
                $urlRouterProvider.otherwise("/tab/product");
                $stateProvider
                    .state("tab",{
                        url:"/tab",
                        templateUrl:"tpl/tab.html"

                    })
                    .state("tab.product",{
                        url:"/product",
                        views:{
                            "productView":{
                                templateUrl:"tpl/product.html",
                                controller:"productController"
                            }
                        }
                    })
                    .state("modifyContact",{
                        url:"/modifyContact/:id",
                        templateUrl:"tpl/modifyContact.html",
                        controller:"modifyController"
                    })
                    .state("tab.cart",{
                        url:"/cart",
                        views:{
                            "cartView":{
                                templateUrl:"tpl/cart.html",
                                controller:"cartController"
                            }
                        }
                       
                    })
                    .state("tab.personal",{
                        url:"/personal",
                        views:{
                            "personalView":{
                                templateUrl:"tpl/personal.html",
                                controller:"personalController"
                            }
                        }
                       
                    })
                    .state("user",{
                        url:"/user",
                        templateUrl:"tpl/login.html",
                        controller:"loginController"
                       
                    })
                    .state("zhuce",{
                        url:"/zhuce",
                        templateUrl:"tpl/zhuce.html",
                        controller:"zhuceController"
                       
                    })
                    .state("dizhi",{
                        url:"/dizhi",
                        templateUrl:"tpl/dizhi.html",
                        controller:"dizhiController"
                       
                    })
                    .state("dingdang",{
                        url:"/dingdang/:id",
                        templateUrl:"tpl/dingdang.html",
                        controller:"dingdangController"
                       
                    })
                    .state("usergeren",{
                        url:"/usergeren/:id",
                        templateUrl:"tpl/usergeren.html",
                        controller:"usergerenController"
                       
                    })
                    .state("order",{
                        url:"/order/:user_id",
                        templateUrl:"tpl/order.html",
                        controller:"orderController"
                       
                    })
                    
                    
                    
            }
        ])
})();